<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>错误页面</title>
    <script th:src="@{/js/jquery-3.2.1.min.js}"></script>
</head>
<body>
<center>
<h2 style="color: red">操作失败!1s后自动返回主页.....</h2>
    <h3 th:text="${error}"></h3>
</center>
<script>
    $(document).ready(function () {

        setTimeout(function () {
            /*返回上一个页面并刷新*/
          /*  window.location.replace("/test/index");*/
           /* window.location.href = "/test/index";*/
            self.location=document.referrer;
        }, 1000);
    })
</script>
</body>
</html>